package com.aloha.boot03.controller;

import com.aloha.boot03.domain.User;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author DaiZhiHeng
 * @date 2023/10/9 16:18
 */
@RestController
@RequestMapping("/source")
public class SourceController {

    @RequestMapping("/test")
    public String test01() {
        return "test";
    }

    @GetMapping("/test/json")
    public Object test02() {
        User user = new User();
        user.setId(1L);
        user.setName(jsonStr);
        return user;
    }

    static String jsonStr = "{\n" +
            "    \"code\": 2000,\n" +
            "    \"msg\": \"success\",\n" +
            "    \"data\": [\n" +
            "        {\n" +
            "            \"queryTime\": \"2023-10-12 08:49:00.0\",\n" +
            "            \"requestInfo\": {\n" +
            "                \"insSize\": \"-1\",\n" +
            "                \"sign\": \"38e94efe91c26f9b419ec2a8a1a8f3df\",\n" +
            "                \"shopId\": \"-1\",\n" +
            "                \"mtncSize\": \"-1\"\n" +
            "            },\n" +
            "            \"responseInfo\": {\n" +
            "                \"prob\": -1.0,\n" +
            "                \"provider\": \"cache\",\n" +
            "                \"accidentDetail\": \"\",\n" +
            "                \"accidentType\": \"非事故车\"\n" +
            "            }\n" +
            "        },\n" +
            "        {\n" +
            "            \"queryTime\": \"2023-10-12 08:48:27.0\",\n" +
            "            \"requestInfo\": {\n" +
            "                \"insSize\": \"-1\",\n" +
            "                \"sign\": \"d1050527f2a964ba1d565faf02393e9c\",\n" +
            "                \"shopId\": \"-1\",\n" +
            "                \"mtncSize\": \"-1\"\n" +
            "            },\n" +
            "            \"responseInfo\": {\n" +
            "                \"prob\": -1.0,\n" +
            "                \"provider\": \"cache\",\n" +
            "                \"accidentDetail\": \"\",\n" +
            "                \"accidentType\": \"非事故车\"\n" +
            "            }\n" +
            "        },\n" +
            "        {\n" +
            "            \"queryTime\": \"2023-10-11 19:28:34.0\",\n" +
            "            \"requestInfo\": {\n" +
            "                \"insSize\": \"-1\",\n" +
            "                \"sign\": \"0264668cb41475d8a0dc2a0a4f3a4b19\",\n" +
            "                \"shopId\": \"-1\",\n" +
            "                \"mtncSize\": \"-1\"\n" +
            "            },\n" +
            "            \"responseInfo\": {\n" +
            "                \"prob\": -1.0,\n" +
            "                \"provider\": \"cache\",\n" +
            "                \"accidentDetail\": \"\",\n" +
            "                \"accidentType\": \"非事故车\"\n" +
            "            }\n" +
            "        },\n" +
            "        {\n" +
            "            \"queryTime\": \"2023-10-11 19:07:34.0\",\n" +
            "            \"requestInfo\": {\n" +
            "                \"insSize\": \"-1\",\n" +
            "                \"sign\": \"87b7801e92130bbd132281461fd98ac3\",\n" +
            "                \"shopId\": \"-1\",\n" +
            "                \"mtncSize\": \"-1\"\n" +
            "            },\n" +
            "            \"responseInfo\": {\n" +
            "                \"prob\": -1.0,\n" +
            "                \"provider\": \"cache\",\n" +
            "                \"accidentDetail\": \"\",\n" +
            "                \"accidentType\": \"非事故车\"\n" +
            "            }\n" +
            "        },\n" +
            "        {\n" +
            "            \"queryTime\": \"2023-10-11 19:07:26.0\",\n" +
            "            \"requestInfo\": {\n" +
            "                \"insSize\": \"-1\",\n" +
            "                \"sign\": \"002ff171744c54bea9c2c31e6074b4ba\",\n" +
            "                \"shopId\": \"-1\",\n" +
            "                \"mtncSize\": \"-1\"\n" +
            "            },\n" +
            "            \"responseInfo\": {\n" +
            "                \"prob\": -1.0,\n" +
            "                \"provider\": \"cache\",\n" +
            "                \"accidentDetail\": \"\",\n" +
            "                \"accidentType\": \"非事故车\"\n" +
            "            }\n" +
            "        },\n" +
            "        {\n" +
            "            \"queryTime\": \"2023-10-11 19:07:22.0\",\n" +
            "            \"requestInfo\": {\n" +
            "                \"insSize\": \"-1\",\n" +
            "                \"sign\": \"8485426722079953fe10a3ac535c7a4a\",\n" +
            "                \"shopId\": \"-1\",\n" +
            "                \"mtncSize\": \"-1\"\n" +
            "            },\n" +
            "            \"responseInfo\": {\n" +
            "                \"prob\": -1.0,\n" +
            "                \"provider\": \"cache\",\n" +
            "                \"accidentDetail\": \"\",\n" +
            "                \"accidentType\": \"非事故车\"\n" +
            "            }\n" +
            "        },\n" +
            "        {\n" +
            "            \"queryTime\": \"2023-10-11 19:07:19.0\",\n" +
            "            \"requestInfo\": {\n" +
            "                \"insSize\": \"-1\",\n" +
            "                \"sign\": \"feb8ffcaa6c4c377ff717127174d346d\",\n" +
            "                \"shopId\": \"-1\",\n" +
            "                \"mtncSize\": \"-1\"\n" +
            "            },\n" +
            "            \"responseInfo\": {\n" +
            "                \"prob\": -1.0,\n" +
            "                \"provider\": \"cache\",\n" +
            "                \"accidentDetail\": \"\",\n" +
            "                \"accidentType\": \"非事故车\"\n" +
            "            }\n" +
            "        },\n" +
            "        {\n" +
            "            \"queryTime\": \"2023-10-11 19:06:38.0\",\n" +
            "            \"requestInfo\": {\n" +
            "                \"insSize\": \"-1\",\n" +
            "                \"sign\": \"19128765d1d5e89b5e2136a41a893ef9\",\n" +
            "                \"shopId\": \"-1\",\n" +
            "                \"mtncSize\": \"-1\"\n" +
            "            },\n" +
            "            \"responseInfo\": {\n" +
            "                \"prob\": -1.0,\n" +
            "                \"provider\": \"cache\",\n" +
            "                \"accidentDetail\": \"\",\n" +
            "                \"accidentType\": \"非事故车\"\n" +
            "            }\n" +
            "        },\n" +
            "        {\n" +
            "            \"queryTime\": \"2023-10-11 19:06:32.0\",\n" +
            "            \"requestInfo\": {\n" +
            "                \"insSize\": \"-1\",\n" +
            "                \"sign\": \"f81244117b16992e9cb1fac0b2f16569\",\n" +
            "                \"shopId\": \"-1\",\n" +
            "                \"mtncSize\": \"-1\"\n" +
            "            },\n" +
            "            \"responseInfo\": {\n" +
            "                \"prob\": -1.0,\n" +
            "                \"provider\": \"cache\",\n" +
            "                \"accidentDetail\": \"\",\n" +
            "                \"accidentType\": \"非事故车\"\n" +
            "            }\n" +
            "        },\n" +
            "        {\n" +
            "            \"queryTime\": \"2023-10-11 19:06:29.0\",\n" +
            "            \"requestInfo\": {\n" +
            "                \"insSize\": \"-1\",\n" +
            "                \"sign\": \"b575a8e50625f24dd888c7bab8585437\",\n" +
            "                \"shopId\": \"-1\",\n" +
            "                \"mtncSize\": \"-1\"\n" +
            "            },\n" +
            "            \"responseInfo\": {\n" +
            "                \"prob\": -1.0,\n" +
            "                \"provider\": \"cache\",\n" +
            "                \"accidentDetail\": \"\",\n" +
            "                \"accidentType\": \"非事故车\"\n" +
            "            }\n" +
            "        },\n" +
            "        {\n" +
            "            \"queryTime\": \"2023-10-11 19:06:25.0\",\n" +
            "            \"requestInfo\": {\n" +
            "                \"insSize\": \"-1\",\n" +
            "                \"sign\": \"2c6927a182d480db3307ad9fd93d9da9\",\n" +
            "                \"shopId\": \"-1\",\n" +
            "                \"mtncSize\": \"-1\"\n" +
            "            },\n" +
            "            \"responseInfo\": {\n" +
            "                \"prob\": -1.0,\n" +
            "                \"provider\": \"db\",\n" +
            "                \"accidentDetail\": \"\",\n" +
            "                \"accidentType\": \"非事故车\"\n" +
            "            }\n" +
            "        }\n" +
            "    ]\n" +
            "}";
}
